Question: Suppose that we are given 40 points equally spaced around the perimeter of a square, so that four of them are located at the vertices and the remaining points divide each side into ten congruent segments.  If $P$, $Q$, and $R$ are chosen to be any three of these points which are not collinear, then how many different possible positions are there for the centroid of $\triangle PQR$?
Answer: Without loss of generality, assume that our square has vertices at $(0,0)$, $(10,0)$, $(10,10)$, and $(0,10)$ in the coordinate plane, so that the 40 equally spaced points are exactly those points along the perimeter of this square with integral coordinates.  We first note that if $P$, $Q$, and $R$ are three of these points which are not collinear, then the centroid of $\triangle PQR$ must lie in the interior of the square, not along one of its sides.  And secondly, we recall that the coordinates of the centroid are found by averaging the coordinates of $P$, $Q$, and $R$.  Therefore the coordinates of the centroid must be of the form $\left(\frac{m}{3}, \frac{n}{3}\right)$ where $m$ and $n$ are integers with $1\le m,n\le 29$.

To show that every point of the form $\left( \frac{m}{3}, \frac{n}{3} \right)$ can be a centroid, we divide into cases.

If $1 \le m \le 10$ and $1 \le n \le 10$, then we can take the points as $(0,0)$, $(m,0)$, and $(0,n)$.

If $10 \le m \le 19$ and $1 \le n \le 10$, then we can take the points as $(m - 10,0)$, $(10,0)$, and $(0,n)$.

If $20 \le m \le 29$ and $1 \le n \le 10$, then we can take the points as $(m - 20,0)$, $(10,0)$, and $(10,n)$.

If $1 \le m \le 10$ and $11 \le n \le 19$, then we can take the points as $(m,0)$, $(0,n - 10)$, and $(0,10)$.

If $10 \le m \le 19$ and $11 \le n \le 19$, then we can take the points as $(10,0)$, $(0,n - 10)$, and $(m - 10,10)$.

If $20 \le m \le 29$ and $11 \le n \le 19$, then we can take the points as $(m - 20,0)$, $(10,n - 10)$, and $(10,10)$.

If $1 \le m \le 10$ and $20 \le n \le 29$, then we can take the points as $(0,n - 20)$, $(0,10)$, and $(m,10)$.

If $10 \le m \le 19$ and $20 \le n \le 29$, then we can take the points as $(0,n - 20)$, $(m - 10,10)$, and $(10,10)$.

If $20 \le m \le 29$ and $20 \le n \le 29$, then we can take the points as $(m - 20,10)$, $(10,n - 20)$, and $(10,10)$.

Thus, every point of the form $\left( \frac{m}{3}, \frac{n}{3} \right)$ can be a centroid.  This means that there are $29^2=\boxed{841}$ positions for the centroid.